﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XChipUtils
{
    public interface ILagrangeHelper
    {
        /// <summary>
        /// 获得某个横坐标对应的Y坐标值
        /// </summary>
        /// <param name="xValue">x坐标值</param>
        /// <returns>对应的y坐标值</returns>
        double GetValue(int xValue);

        /// <summary>
        /// 计算插值曲线
        /// </summary>
        /// <returns>输出y坐标数组</returns>
        double[] CalcCurve();

        /// <summary>
        /// 计算样条插值
        /// </summary>
        /// <returns>样条插值结果数组</returns>
        double[] Spline();

        double CLIP_RANGE(double value, int min, int max);
    }
}
